/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.klikmee.sms.services.chat.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author makcro
 */
@Entity
@Table(name = "signature")
@NamedQueries({
    @NamedQuery(name = "Signature.findAll", query = "SELECT s FROM Signature s"),
    @NamedQuery(name = "Signature.findAllActive", query = "SELECT s FROM Signature s where s.active = true"),
    @NamedQuery(name = "Signature.findById", query = "SELECT s FROM Signature s WHERE s.id = :id"),
    @NamedQuery(name = "Signature.findByName", query = "SELECT s FROM Signature s WHERE s.name = :name"),
    @NamedQuery(name = "Signature.findByDescription", query = "SELECT s FROM Signature s WHERE s.signature = :signature")})
public class Signature implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "Id", nullable = false)
    private Integer id;
    @Column(name = "Name", length = 1024)
    private String name;
    @Column(name = "Signature", length = 1024)
    private String signature;
    @Column(name = "Active")
	private Boolean active;

    public Signature() {
    }

    public Signature( Integer id ) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId( Integer id ) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName( String name ) {
        this.name = name;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature( String signature ) {
        this.signature = signature;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals( Object object ) {
        if (!(object instanceof Signature)) {
            return false;
        }
        Signature other = (Signature) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals( other.id ))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "smschatmodel.Signature[ id=" + id + " ]";
    }

	public void setActive(Boolean active) {
		this.active = active;
	}

	public Boolean getActive() {
		return active;
	}
    
}
